﻿Public Class BasePage
    Inherits System.Web.UI.Page

    Protected Function GetCurrentUserName() As String
        Return User.Identity.Name
    End Function

    Protected Function GetCurrentUserID() As ULong
        Return GetUserID(GetCurrentUserName())
    End Function

    Protected Function GetUserID(ByVal userName As String) As ULong
        Dim gateway As New SiteUserGateway()
        Return gateway.FindByUserName(userName).Rows(0)("ID")
    End Function
End Class
